package com.sinog.front.feign.biz;

import com.sinog.core.utilbean.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;

/**
 * @desc 预安置管理 - 预安置人员迁移
 * @author wangxj
 * @date 2022/3/9 11:11
 */
@FeignClient("sinog2c-biz")
public interface PrisonerTransferService {

    /**
     * 预安置管理 - 预安置人员迁移 - 发起迁移/接收迁移列表
     * @param map 查询参数
     * @param pageIndex 起始页
     * @param pageSize 止页
     * @return String
     */
    @RequestMapping("/azbj/transfer/fqqy/info/list")
    String getFqTranslateBaseInfoList(@RequestParam Map<String,Object> map,
                                      @RequestParam(value = "pageIndex", required = false) Integer pageIndex,
                                      @RequestParam(value = "pageSize", required = false) Integer pageSize);

    /**
     * 预安置管理 - 预安置人员迁移 - 添加页面 - 搜索条件(根据key模糊搜索)
     * @param key 服刑人员名称
     * @param departId 当前登录用户DepartId
     * @param level 当前登录用户level
     * @return List<Map<String,Object>>
     */
    @RequestMapping("/azbj/transfer/fqqy/getPrisonerList")
    List<Map<String, Object>> getPrisonerList(@RequestParam(value = "key", required = false) String key,
                                              @RequestParam(value = "departId", required = false) String departId,
                                              @RequestParam(value = "level", required = false) String level);

    /**
     * 根据transfer编号查找单条信息
     * @param id id
     * @return Result
     */
    @RequestMapping("/azbj/transfer/fqqy/getTransferById")
    Result getTransferById(@RequestParam(value = "id",required = false) String id);

    /**
     * 反显服刑人员基本信息
     * @param priNum 服刑编号
     * @return Map<String, Object>
     */
    @RequestMapping("/azbj/transfer/fqqy/getBaseInfoByPriNumMap")
    Map<String, Object> getBaseInfoByPriNumMap(@RequestParam(value = "priNum",required = false) String priNum);

    /**
     * 预安置管理 - 预安置人员迁移 - 添加页面 - 保存
     * @param dataStr 业务数据
     * @return Result
     */
    @RequestMapping("/azbj/transfer/fqqy/savePrisonerTransfer")
    Result savePrisonerTransfer(@RequestParam(value = "dataStr",required = false) String dataStr);

    /**
     * 预安置管理 - 预安置人员迁移 - 发起迁移 - 撤回
     * @param id transfet编号
     * @return Result
     */
    @RequestMapping("/azbj/transfer/fqqy/toRevoke")
    Result toRevoke(@RequestParam(value = "id", required = false) String id);

    /**
     * 预安置管理 - 预安置人员迁移 - 发起迁移 - 删除(逻辑删除)
     * @param id transfet编号
     * @return Result
     */
    @RequestMapping("/azbj/transfer/fqqy/toDelete")
    Result toDelete(@RequestParam(value = "id", required = false) String id);

    /**
     * 获取转监单位
     * @param code 当前省份标识
     * @param level 服刑单位(例、01:监狱,02:看守所,05:社矫中心)
     * @param departId 当前用户的departId
     * @return List<Map<String, Object>>
     */
    @RequestMapping("/azbj/transfer/fqqy/getTransferUnit")
    List<Map<String, Object>> getTransferUnit(@RequestParam(value = "pid", required = false) String code,
                                              @RequestParam(value = "level", required = false) String level,
                                              @RequestParam(value = "departId", required = false) String departId);

    /**
     * 查找此人是否正在户籍迁移
     * @param priNumList 服刑人员编号
     * @return Result
     */
    @RequestMapping("/azbj/transfer/fqqy/getTransferRecord")
    Result getTransferRecord(@RequestBody List<String> priNumList);

    /**
     * 获取推送备注信息
     * @param hcId 核查编号
     * @return Result
     */
    @RequestMapping("/azbj/yazgl/yazryhc/getBaseInfoByPriNum")
    Result getBaseInfoByPriNum(@RequestParam(value = "hcId", required = false) String hcId);
}